package com.dragon.user_service.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dragon.user_service.domain.dto.request.user.UserLoginRequest;
import com.dragon.user_service.domain.dto.request.user.UserQueryRequest;
import com.dragon.user_service.domain.dto.request.user.UserRegisterRequest;
import com.dragon.user_service.domain.entity.User;
import com.dragon.user_service.domain.vo.user.LoginUserVO;
import com.dragon.user_service.domain.vo.user.UserVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
* @author 20390
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2025-01-21 10:08:38
*/
public interface UserService extends IService<User> {
    boolean userRegister(UserRegisterRequest userRegisterRequest, HttpServletRequest request);

    LoginUserVO userLogin(UserLoginRequest userLoginRequest, HttpServletResponse response);

    User getLoginUser(HttpServletRequest request);

    LoginUserVO getLoginUserVO(User user);

    UserVO getUserVO(User user);

    List<UserVO> getUserVOList(List<User> userList);

    boolean userLogout(HttpServletRequest request);

    User getUserById(long id);

    UserVO getUserVOById(long id);

    boolean isAdmin(User user);

    QueryWrapper<User> getQueryWrapper(UserQueryRequest userQueryRequest);

    String getEncryptPassword(String password);
}
